package com.itheima;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;

@RestController
@RequestMapping("/hello")
public class HelloWorld {
    @GetMapping
    public void print(HttpServletResponse response) throws IOException {
        System.out.println("HelloWorld");
        PrintWriter writer = response.getWriter();
        writer.write("helloworld");
    }
}
